﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using LeSoft.Application.Code;
using LeSoft.Util;
using LeSoft.Application.Bussiness;

namespace LeSoft.Application.Web.Areas.SystemManage.Controllers
{
    public class MessagesController : Controller
    {
        //
        // GET: /SystemManage/Messages/
        private MessagesBLL bll = new MessagesBLL();

        [HttpGet]
        [HandlerAuthorize(PermissionMode.Enforce)]
        public ActionResult Index()
        {
            return View();
        }


        /// <summary>
        /// 查询消息
        /// </summary>
        /// <param name="pagination">分页参数</param>
        /// <param name="queryJson">查询条件</param>
        /// <returns></returns>
        [HttpGet]
        public ActionResult GetPageListJson(Pagination pagination)
        {
            string ToManId = OperatorProvider.Provider.Current().UserId;
            var data = bll.GetPageList(pagination, ToManId);
            return Content(data.ToJson());
        }
    }
}
